import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import svgLoader from 'vite-svg-loader';

// https://vitejs.dev/config/
export default defineConfig({
    base: './',
    plugins: [vue(), svgLoader(), vueJsx()],
    build: {
        rollupOptions: {
            output: {
                manualChunks: (id: string) => {
                    if (id.indexOf('tdesign-vue-next') > -1) {
                        return "tdesign-vue-next"
                    } else if (id.indexOf('node_modules') > -1) {
                        return 'node_modules'
                    }
                }
            }
        }
    }
})
